package com.qfedu.mbti.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 千锋Java,为你而生！
 *
 * @Author: Feri
 * @Date:2024/11/4 16:03
 * @Modified:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class R<T> {
    private Integer code;
    private String msg;
    private T data;

    public static <T> R<T> ok(T obj){
        return new R<T>(0,"操作成功",obj);
    }
    public static <T> R<T> fail(T obj){
        return new R<T>(1,"操作失败",obj);
    }
}
